package com.movie.demo.pojo;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("user")
public class User {
        @TableId(type = IdType.AUTO)
        private Integer uid;
        @TableField
        @NotBlank
        private String account;
        @TableField
        @NotBlank
        @Size(min = 6,max = 12)
        private String password;
        @TableField
        @NotBlank
        @Size(min = 2,max = 7)
        private String name;
        @TableField
        @NotBlank
        @Size(min = 7)
        private String userphone;
        @TableField
        private String avatar;
        @TableField
        private int role;
}
